package playtest;

import java.util.Random;

public class Car {
	private String name;
	private String model;
	private int speed;
	private int locX;
	private int locY;
	
	
	public static void main(String[] args) {
		Car c = new Car();
		c.setName("Audi");
		c.setModel("Sports");
		c.setSpeed(10);
		Random r = new Random();
		for(int i=0; i<10; i++){
			boolean direction = r.nextBoolean();
			if(direction){
				c.setLocX(c.getLocX() + c.getSpeed());
			}else{
				c.setLocY(c.getLocY() + c.getSpeed());
			}
		}
		
		System.out.println("Current position of car: (" + c.getLocX() + "," + c.getLocY() + ")");
		
		System.exit(0);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public int getSpeed() {
		return speed;
	}

	public void setSpeed(int speed) {
		this.speed = speed;
	}

	public int getLocX() {
		return locX;
	}

	public void setLocX(int locX) {
		this.locX = locX;
	}

	public int getLocY() {
		return locY;
	}

	public void setLocY(int locY) {
		this.locY = locY;
	}

}
